package com.admin.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import com.admin.dao.AdminDao;
import com.admin.domain.ItemCommand;

@Controller
public class AdminItemDetailController {

	@Autowired
	private AdminDao adminDao;
	
	@RequestMapping("/shop/itemDetail.do")
	public ModelAndView process(@RequestParam("i_no") int i_no){
		
		ItemCommand item = adminDao.selectItem(i_no);
		
		return new ModelAndView("itemDetail", "item", item);
	}
	
}
